home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************
- * *
- * File: GUIRUN.H *
- * *
- * Description: This header file contains the function prototypes *
- * and data structures required for the generated *
- * runtime code. *
- * *
- * Copyright: (C) Copyright 1993 JBA International, plc. *
- * All Rights Reserved Worldwide. *
- * *
- ***************************************************************************/
-
- #ifndef H_GUIRUN
- #define H_GUIRUN
-
- #include <iostream.h>
-
-
- /***************************************************************************
- * Miscellaneous macros/messages. *
- ***************************************************************************/
-
- #define WM_GUIDATAINDEX WM_USER+1 /* Get window words index */
- #define WM_GUIGETWINDOW WM_USER+2 /* Get window information */
- #define WM_GUIGETPROPERTY WM_USER+3 /* Get window property */
- #define WM_GUISETPROPERTY WM_USER+4 /* Set window property */
- #define WM_GUIWINDOWLOADED WM_USER+5 /* Window has been loaded */
- #define WM_GUIPARENTRESIZED WM_USER+6 /* Parent has resized */
- #define WM_GUITHREADENDED WM_USER+7 /* Thread ended */
- #define WM_GUISHUTDOWN WM_USER+8 /* Shutdown detected */
- #define WM_GUISETHELPFILE WM_USER+9
- /* DDE messages */
- #define WM_GUIDDEACK WM_USER+10 /* DDE Acknowledge */
- #define WM_GUIDDEADVISE WM_USER+11 /* DDE Advise Request */
- #define WM_GUIDDEDATA WM_USER+12 /* DDE Data Message */
- #define WM_GUIDDEEXECUTE WM_USER+13 /* DDE Execute Request */
- #define WM_GUIDDEINITIATE WM_USER+14 /* DDE Initiate Request */
- #define WM_GUIDDEINITIATEACK WM_USER+15 /* DDE Initiate Ack. */
- #define WM_GUIDDEPOKE WM_USER+16 /* DDE Poke Request */
- #define WM_GUIDDEREQUEST WM_USER+17 /* DDE Request Message */
- #define WM_GUIDDETERMINATE WM_USER+18 /* DDE Terminate Request */
- #define WM_GUIDDEUNADVISE WM_USER+19 /* DDE Unadvise Request */
-
- #define WM_GUIUSER WM_USER+20 /* Last GUI message */
-
- #define FOREVER GuiForever()
- #define PMENTRY MRESULT APIENTRY
-
- #define IDHT_GUIMAIN 4000 /* Main help table ID */
-
-
- /***************************************************************************
- * Window word offsets for mandatory values. *
- ***************************************************************************/
-
- #define QWS_ORIGXPOS 0 /* Unscaled X position */
- #define QWS_ORIGYPOS 2 /* Unscaled Y position */
- #define QWS_ORIGWIDTH 4 /* Unscaled width */
- #define QWS_ORIGHEIGHT 6 /* Unscaled height */
- #define QWL_MOUSEIMG 8 /* Mouse pointer type */
- #define QWL_MOUSEPTR 12 /* Mouse pointer handle */
- #define QWL_GUIUSER 16 /* Start of user words */
-
-
- /***************************************************************************
- * System window/control class constants. *
- ***************************************************************************/
-
- #define WC_GUIBUTTON "GUIBUTTON"
- #define WC_GUICOMBOBOX "GUICOMBOBOX"
- #define WC_GUIENTRYFIELD "GUIENTRYFIELD"
- #define WC_GUILISTBOX "GUILISTBOX"
- #define WC_GUIMLE "GUIMLE"
- #define WC_GUISCROLLBAR "GUISCROLLBAR"
- #define WC_GUISTATIC "GUISTATIC"
-
-
- /***************************************************************************
- * Standard window/control names. *
- ***************************************************************************/
-
- #define WT_UNKNOWN "Unknown"
- #define WT_DESKTOP "Desktop"
- #define WT_OBJECT "Object"
- #define WT_FRAME "Frame"
- #define WT_DIALOG "Dialog"
- #define WT_CLIENT "Client"
- #define WT_SYSMENU "System Menu"
- #define WT_MENUBAR "Menu Bar"
- #define WT_SUBMENU "Sub Menu"
- #define WT_MENUITEM "Menu Item"
- #define WT_PUSHBUTTON "Push Button"
- #define WT_RADIOBUTTON "Radio Button"
- #define WT_CHECKBOX "Checkbox"
- #define WT_3STATE "3-State Checkbox"
- #define WT_USERBUTTON "User Button"
- #define WT_COMBOBOX "Combobox"
- #define WT_ENTRYFIELD "Entry Field"
- #define WT_LISTBOX "Listbox"
- #define WT_MLE "Multi-Line Entry"
- #define WT_VSCROLL "Vert. Scrollbar"
- #define WT_HSCROLL "Horz. Scrollbar"
- #define WT_STATICTEXT "Static Text"
- #define WT_GROUPBOX "Group Box"
- #define WT_STATICICON "Icon"
- #define WT_STATICSYSICON "System Icon"
- #define WT_STATICBITMAP "Bitmap"
- #define WT_STATICRECT "Rectangle"
- #define WT_CUSTOM "Custom Control"
-
-
- /***************************************************************************
- * System window/control property identifiers. *
- ***************************************************************************/
-
- #define WPID_NAME 0 /* Window name */
- #define WPID_ID 1 /* Window ID */
- #define WPID_PARENT 2 /* Window parent */
- #define WPID_OWNER 3 /* Window owner */
- #define WPID_XPOS 4 /* Window X position */
- #define WPID_YPOS 5 /* Window Y position */
- #define WPID_WIDTH 6 /* Window width */
- #define WPID_HEIGHT 7 /* Window height */
- #define WPID_STYLE 8 /* Window style flags */
- #define WPID_HELP 9 /* Window help name */
- #define WPID_TEXT 10 /* Window text */
- #define WPID_VISIBLE 11 /* Window visible? */
- #define WPID_ENABLED 12 /* Window enabled? */
- #define WPID_UPDATE 13 /* Window update enabled? */
- #define WPID_MOUSEPTR 14 /* Window mouse pointer */
- #define WPID_USER 15 /* Last system property */
-
-
- /***************************************************************************
- * Property indexes for some of the system controls. *
- ***************************************************************************/
-
- #define WPID_FRAMEFLAGS WPID_USER+0 /* Frame flags */
- #define WPID_FRAMEMEMOPTIONS WPID_USER+1 /* Frame memory options */
- #define WPID_FRAMEICON WPID_USER+2 /* Frame icon name */
- #define WPID_FRAMESOURCE WPID_USER+3 /* Frame source file */
-
- #define WPID_BUTTONCHECKED WPID_USER+0 /* Button checked */
- #define WPID_BUTTONRESOURCE WPID_USER+1 /* Button resource name */
- #define WPID_BUTTONDEFAULT WPID_USER+2 /* Button default */
-
- #define WPID_CUSTOMCLASS WPID_USER+0 /* Custom class name */
-
- #define WPID_ENTRYMAXLENGTH WPID_USER+0 /* Entry field max length */
- #define WPID_ENTRYMINSEL WPID_USER+1 /* Entry field min sel. */
- #define WPID_ENTRYMAXSEL WPID_USER+2 /* Entry field max sel. */
-
- #define WPID_LISTBOXCOUNT WPID_USER+0 /* Listbox count */
- #define WPID_LISTBOXSEL WPID_USER+1 /* Listbox selection */
- #define WPID_LISTBOXTOP WPID_USER+2 /* Listbox top */
-
- #define WPID_MENUFLAGS WPID_USER+0 /* Menu flags */
- #define WPID_MENUPOSITION WPID_USER+1 /* Menu position */
- #define WPID_MENUBITMAP WPID_USER+2 /* Menu bitmap */
- #define WPID_MENUACCELFLAGS WPID_USER+3 /* Menu accel flags */
- #define WPID_MENUACCELKEY WPID_USER+4 /* Menu accel key */
- #define WPID_MENUCHECKED WPID_USER+5 /* Menu checked */
-
- #define WPID_SCROLLMIN WPID_USER+0 /* Scrollbar minimum */
- #define WPID_SCROLLMAX WPID_USER+1 /* Scrollbar maximum */
- #define WPID_SCROLLPOS WPID_USER+2 /* Scrollbar position */
-
- #define WPID_STATICRESOURCE WPID_USER+0 /* Static resource name */
-
-
- /***************************************************************************
- * Data type constants. *
- ***************************************************************************/
-
- #define DT_VOID 0x00000000L /* Void (no type) */
- #define DT_SHORT 0x00000001L /* Short (short) */
- #define DT_LONG 0x00000002L /* Long (long) */
- #define DT_INT 0x00000003L /* int (Short or Long) */
- #define DT_SREAL 0x00000004L /* Short Real (float) */
- #define DT_REAL 0x00000008L /* Real (double) */
- #define DT_LREAL 0x00000010L /* Long Real(long double) */
- #define DT_SCALED 0x00000020L /* Scaled integer (zoned) */
- #define DT_NUM 0x000000FFL /* Numeric type */
- #define DT_STRING 0x00000100L /* String string (char *) */
- #define DT_WINDOW 0x00000200L /* Window information */
- #define DT_IMAGE 0x00000400L /* Image type */
- #define DT_MESSAGE 0x00000800L /* Message type */
- #define DT_CHAR 0x00001000L /* Character type */
- #define DT_USER 0x00008000L /* User data type */
- #define DT_THREAD 0x00010000L /* Thread information */
- #define DT_MODULE 0x00020000L /* Module routine address */
- #define DT_STRUCT 0x00040000L /* Structure */
- #define DT_ANYSTRUCT 0x00080000L /* Any structure */
- #define DT_ANY 0x000FFFFFL /* Any type */
-
- #define DT_MASK(x) (x & DT_ANY)
-
-
- /***************************************************************************
- * REAL data types. *
- ***************************************************************************/
-
- typedef float SREAL, *PSREAL;
- typedef double REAL, *PREAL;
- typedef long double LREAL, *PLREAL;
-
-
- /***************************************************************************
- * Window data type. *
- ***************************************************************************/
-
- typedef struct _WINDOW
- {
- char szType [20+1]; /* Window type */
- LONG lID; /* Window ID */
- HWND hwnd; /* Window handle */
- HWND hwndClient; /* Window client */
- HWND hwndParent; /* Window parent */
- PFNWP pfnwp; /* Window procedure */
- HMODULE hModule; /* Resource module */
- }
- WINDOW, *PWINDOW;
-
-
- /***************************************************************************
- * Message data type. *
- ***************************************************************************/
-
- typedef struct _MESSAGE
- {
- LONG lMsgID; /* Message ID */
- ULONG ulOptions; /* Message display options*/
- }
- MESSAGE, *PMESSAGE;
-
-
- /***************************************************************************
- * The String class provides support for the JOT string data type. *
- * It allows concatenation via the + operator and supports *
- * manipulation of fixed length string buffers. *
- ***************************************************************************/
-
- class String
- {
- public:
- // Constructors and destructor
- String ();
- ~String ();
- String (const String& sString);
- String (const char *pszStr);
- String (const char cChar);
- String (const char *pBuffer, int iSize);
-
- // Conversion operators
- operator char () const;
- operator void *() const;
- operator char *() const;
- operator const char *() const;
-
- // Assignment operators
- String& operator= (const String& sString);
- String& operator= (const char *pszStr);
- String& operator= (const char cChar);
-
- // Comparison operators
- friend int operator== (const String& sString1, const String& sString2);
- friend int operator!= (const String& sString1, const String& sString2);
- friend int operator> (const String& sString1, const String& sString2);
- friend int operator< (const String& sString1, const String& sString2);
- friend int operator>= (const String& sString1, const String& sString2);
- friend int operator<= (const String& sString1, const String& sString2);
-
- // Stream operators
- friend ostream& operator << (ostream& stream, const String& sString);
- friend istream& operator >> (istream& stream, String& sString);
-
- // Concatenation operators
- friend String operator+ (const String& sString1, const String& sString2);
-
- // Utility member functions
- friend int GuiStrLen (const String& sString);
- friend String GuiChr (int iAscii);
- friend int GuiAsc (const String& sChar);
- friend String GuiStr (int iNumber);
- friend String GuiStr (short sNumber);
- friend String GuiStr (long lNumber);
- friend String GuiStr (float fNumber);
- friend String GuiStr (double dNumber);
- friend String GuiStr (long double ldNumber);
- friend String GuiStrLower (const String& sString);
- friend String GuiStrUpper (const String& sString);
- friend String GuiStrLeft (const String& sString, int iSize);
- friend String GuiStrMid (const String& sString, int iStart, int iSize);
- friend String GuiStrRight (const String& sString, int iSize);
- friend String GuiStrTrim (const String& sString);
- friend String GuiStrLTrim (const String& sString);
- friend String GuiStrRTrim (const String& sString);
- friend String GuiStrRepeat (const String& sChar, int iCount);
- friend int GuiStrSearch (const String& sString, const String& sSubString, int iStart);
- friend void GuiStrFill (char *pBuffer, int iSize, const String& sString);
- friend String GuiToString (const void *pStruct, int iSize);
- friend void *GuiToStruct (String *psString, int iSize);
-
- protected:
- // Internal routines
- friend int GuiStrCmp (const char *, const char *);
-
- // Internal representation (ASCIIZ string)
- char *psz;
- };
-
-
- /***************************************************************************
- * The Scaled class provides support for the JOT scaled integer *
- * data type. It provides support for arbitrary precision numbers. *
- ***************************************************************************/
-
- class Scaled
- {
- public:
- // Constructors and destructor
- Scaled ();
- ~Scaled ();
- Scaled (const Scaled& sNumber);
- Scaled (const char *pszNumber);
- Scaled (short sNumber);
- Scaled (int iNumber);
- Scaled (long lNumber);
- Scaled (float fNumber);
- Scaled (double dNumber);
- Scaled (long double ldNumber);
- Scaled (char *pZoned, int iSize, int iDecPlaces);
-
- // Conversion operators
- operator char *() const;
- operator const char *() const;
- operator short() const;
- operator long() const;
- operator float() const;
- operator double() const;
- operator long double() const;
-
- // Assignment operators
- Scaled& operator= (const char *pszNumber);
- Scaled& operator= (const Scaled& sNumber);
-
- // Comparison operators
- friend int operator == (const Scaled& sNum1, const Scaled& sNum2);
- friend int operator != (const Scaled& sNum1, const Scaled& sNum2);
- friend int operator > (const Scaled& sNum1, const Scaled& sNum2);
- friend int operator < (const Scaled& sNum1, const Scaled& sNum2);
- friend int operator >= (const Scaled& sNum1, const Scaled& sNum2);
- friend int operator <= (const Scaled& sNum1, const Scaled& sNum2);
-
- // Stream operators
- friend ostream& operator << (ostream& stream, const Scaled& sNumber);
- friend istream& operator >> (istream& stream, Scaled& sNumber);
-
- // Mathematical operators
- friend Scaled operator+ (const Scaled& sNum1, const Scaled& sNum2);
- friend Scaled operator- (const Scaled& sNum1, const Scaled& sNum2);
- friend Scaled operator* (const Scaled& sNum1, const Scaled& sNum2);
- friend Scaled operator/ (const Scaled& sNum1, const Scaled& sNum2);
-
- // Unary - operator
- friend Scaled operator- (const Scaled& sNumber);
-
- // Utility functions
- friend Scaled GuiMod (const Scaled& sNum1, const Scaled& sNum2);
- friend Scaled GuiVal (const char *pszNumber);
- friend String GuiStr (const Scaled& sNumber);
- friend Scaled GuiAbs (const Scaled& sNumber);
- friend Scaled GuiInt (const Scaled& sNumber);
- friend Scaled GuiFrac (const Scaled& sNumber);
- friend Scaled GuiCeil (const Scaled& sNumber);
- friend Scaled GuiFloor (const Scaled& sNumber);
-
- void Round (long);
- void Length (long&, long&) const;
-
- // Internal routines.
- protected:
- char GetDigit (long) const;
- BOOL SetDigit (long, char);
- BOOL MoreDigits (long);
- BOOL SizeDigits (long);
- friend void GuiScaledStrip (Scaled&);
- friend void GuiScaledAlign (Scaled&, Scaled&);
- friend void GuiScaledAdd (Scaled&, Scaled&, Scaled&);
- friend void GuiScaledSub (Scaled&, Scaled&, Scaled&);
- friend void GuiScaledMul (Scaled&, Scaled&, Scaled&);
- friend void GuiScaledDiv (Scaled&, Scaled&, Scaled&);
- friend long GuiArrayAdd (char *, char *, long);
- friend long GuiArraySub (char *, char *, long);
- friend long GuiArrayMul (char *, char *, long, long);
- friend int GuiScaledCmp (const Scaled&, const Scaled&);
- friend void GuiFmtZoned (char *, int, int, const Scaled&);
-
- // Internal representation variables.
- long lSign; /* Sign of number */
- long lTotal; /* Total number of digits */
- long lDec; /* Total number of decimals */
- long lAlloc; /* Total size allocated */
- char *pDigits; /* Digits array */
- };
-
-
- /***************************************************************************
- * Macro for defining encoded ZONED fields within structures. *
- ***************************************************************************/
-
- #define SCALED(name,len,dec) char name[len]
-
-
- /***************************************************************************
- * The Image class provides support for the JOT IMAGE data type. *
- ***************************************************************************/
-
- // Image reference counting class
- class ImageRef
- {
- // Friend of Image
- friend class Image;
-
- private:
- // Constructor & destructor
- ImageRef ();
- ImageRef (ULONG, ULONG);
- ~ImageRef ();
-
- // Internal routines
- #ifdef INCL_PM
- friend ULONG GuiMakeImage (ULONG, LONG, HMODULE);
- friend void GuiFreeImage (ImageRef&);
- friend ULONG GuiLoadImage (char *, PULONG);
- friend ULONG GuiLoadIcon (PBYTE, LONG, PBITMAPFILEHEADER2, BOOL);
- friend ULONG GuiLoadBitmap (PBYTE, LONG, PBITMAPFILEHEADER2);
- friend ULONG GuiCopyIcon (HPOINTER);
- friend ULONG GuiCopyBitmap (HBITMAP);
- #endif /* INCL_PM */
-
- // Internal variables
- LONG lCount; /* Image refernce count */
- ULONG ulType; /* Image type */
- ULONG ulHandle; /* Image handle */
- };
-
- class Image
- {
- public:
- // Constructors and destructor
- Image ();
- ~Image ();
- Image (const Image& img);
- Image (ULONG ulType, LONG lResourceID, HMODULE hModule);
- Image (ULONG ulType, LHANDLE hHandle);
- Image (const String& sFileName);
- Image (char *pszFileName);
-
- // Assignment operators
- Image& operator= (const Image& img);
- Image& operator= (const char *pszFileName);
-
- // Comparison operators
- friend int operator== (const Image& img1, const Image& img2);
- friend int operator!= (const Image& img1, const Image& img2);
-
- // Access members
- ULONG Type (void) const;
- LHANDLE Handle (void) const;
- void GetSize (LONG *, LONG *);
-
- protected:
- // Internal variables
- ImageRef *pRef; /* Reference pointer */
- };
-
-
- /***************************************************************************
- * Image types. *
- ***************************************************************************/
-
- #define GUIIMG_UNKNOWN 0 /* Unknown image type */
- #define GUIIMG_ICON 1 /* Icon image */
- #define GUIIMG_POINTER 2 /* Pointer image */
- #define GUIIMG_SYSPOINTER 3 /* System pointer image */
- #define GUIIMG_BITMAP 4 /* Bitmap image */
- #define GUIIMG_SYSBITMAP 5 /* System bitmap image */
- #define GUIIMG_METAFILE 6 /* Metafile image */
-
-
- /***************************************************************************
- * Image drawing flags. *
- ***************************************************************************/
-
- #define GUIDRW_NORMAL 0x00000000 /* Draw normal */
- #define GUIDRW_HALFTONED 0x00000001 /* Draw half-toned */
- #define GUIDRW_INVERTED 0x00000002 /* Draw inverted */
- #define GUIDRW_STRETCHED 0x00000004 /* Draw stretched */
-
-
- /***************************************************************************
- * Code module data type. *
- ***************************************************************************/
-
- typedef void (_PFNMOD)(void);
- typedef _PFNMOD *PFNMOD;
-
-
- /***************************************************************************
- * The Thread class maintains runtime information about a thread. *
- ***************************************************************************/
-
- // Thread reference class
- class ThreadRef
- {
- // Friend of Thread
- friend class Thread;
-
- // Friend functions
- friend void _Optlink GuiThreadShell (void *);
-
- private:
- // Constructor & destructor
- ThreadRef ();
-
- // Internal variables
- HAB hab; /* Thread anchor block */
- HMQ hmq; /* Thread message queue */
- TID tid; /* Thread ID */
- BOOL bEnded; /* Thread ended flag */
- PFNMOD pModule; /* Thread routine */
- HWND hwndNotify; /* Window to notify */
- LONG lCount; /* Reference count */
- };
-
- class Thread
- {
- public:
- // Constructors & destructor
- Thread ();
- ~Thread ();
- Thread (const Thread& thd);
- Thread (ThreadRef *pRef);
-
- // Assignment operators
- Thread& operator= (const Thread& thd);
-
- // Comparison operators
- friend int operator== (const Thread& thd1, const Thread& thd2);
- friend int operator!= (const Thread& thd1, const Thread& thd2);
-
- // Utility members functions
- friend Thread GuiCreateThread (PFNMOD, LONG, PWINDOW);
- BOOL Create (PFNMOD pModule, LONG lStack, HWND hwndNotify);
- BOOL Destroy (void);
- void Exit (LONG);
- BOOL Sleep (void);
- BOOL Wake (void);
- BOOL Wait (void);
- TID ID (void) const;
-
- // Internal routines
- friend void _Optlink GuiThreadShell (void *);
-
- protected:
- // Internal variables
- ThreadRef *pRef;
- };
-
-
- /***************************************************************************
- * Symbol pointer. *
- ***************************************************************************/
-
- #ifndef SYM_DEFINED
- typedef PVOID PSYM;
- #endif
-
-
- /***************************************************************************
- * Application information. *
- ***************************************************************************/
-
- typedef struct _APPINFO
- {
- HAB hab; /* Main anchor block */
- HMQ hmq; /* Main message queue */
- PID pid; /* Current process ID */
- int CmdArgC; /* Command line count */
- char **CmdArgV; /* Command line args */
- HWND hwndHelp; /* Help window */
- HWND hwndMain; /* Main window */
- HWND hwndSave; /* Saved focus window */
- char szPgmTitle [256]; /* Task-list title */
- char szMsgFile [256]; /* Message filename */
- char szCurMsgFile [256]; /* Current message file */
- char szHlpFile [256]; /* Help filename */
- char szCurHlpFile [256]; /* Current help file */
- char szNxtHlpFile [256]; /* Next help file */
- HMODULE hmodNxtHelp; /* Next help module */
- SHORT sExitCode; /* Program exit code */
- }
- APPINFO, *PAPPINFO;
-
-
- /***************************************************************************
- * DLL instance information. *
- ***************************************************************************/
-
- typedef struct _DLLINST
- {
- HMODULE hModule; /* DLL module handle */
- char szMsgFile [256]; /* DLL message file */
- char szHlpFile [256]; /* DLL help file */
- }
- DLLINST, *PDLLINST;
-
-
- /***************************************************************************
- * Frame data (not stored in window words like other controls). *
- ***************************************************************************/
-
- typedef struct _FRAMEWORDS
- {
- PFNWP pfnwp; /* Frame window procedure */
- LONG lID; /* Frame window ID */
- SWP swpOrig; /* Unscaled frame size */
- Image *pMousePtr; /* Mouse pointer image */
- }
- FRAMEWORDS, *PFRAMEWORDS;
-
-
- /***************************************************************************
- * Runtime error codes. *
- ***************************************************************************/
-
- #define GUIERR_OK 0 /* No error */
- #define GUIERR_OUTOFMEMORY 0x00000001 /* Out of memory */
- #define GUIERR_DIVBYZERO 0x00000002 /* Divide by zero */
- #define GUIERR_CANTLOADWIN 0x00000003 /* Cant load window */
- #define GUIERR_NULLHWND 0x00000004 /* Window does not exist */
- #define GUIERR_EVENTLOOP 0x00000005 /* Event loop overflow */
- #define GUIERR_THDSTARTED 0x00000006 /* Thread already started */
- #define GUIERR_THDENDED 0x00000007 /* Thread already ended */
- #define GUIERR_MAX 0x00000007 /* Max. error number */
-
-
- /***************************************************************************
- * DDE error codes. *
- ***************************************************************************/
-
- #define GUIERR_DDEINVALIDCONN -1 /* Invalid Connection Handle */
- #define GUIERR_DDEBUSY -2 /* Connection is Busy */
- #define GUIERR_DDESYSERROR -3 /* System Error */
- #define GUIERR_DDENOSERVERS -4 /* No Servers Available */
- #define GUIERR_DDETIMEOUT -5 /* Time-out awaiting response */
- #define GUIERR_DDEINVALIDITEM -6 /* Invalid Item */
- #define GUIERR_DDEOUTOFMEMORY -7 /* Not Enough Memory */
-
- /* A DDE Error Code above 0 is an application defined code */
-
-
- /***************************************************************************
- * RGB Colors. *
- ***************************************************************************/
-
- #define MAKERGB(r,g,b) ((((ULONG)(r) & 0xFF) << 16) | \
- (((ULONG)(g) & 0xFF) << 8) | \
- (((ULONG)(b) & 0xFF)))
-
- #define RGB_DARKGRAY MAKERGB(128, 128, 128)
- #define RGB_DARKBLUE MAKERGB( 0, 0, 128)
- #define RGB_DARKRED MAKERGB(128, 0, 0)
- #define RGB_DARKPINK MAKERGB(128, 0, 128)
- #define RGB_DARKGREEN MAKERGB( 0, 128, 0)
- #define RGB_DARKCYAN MAKERGB( 0, 128, 128)
- #define RGB_BROWN MAKERGB(128, 128, 0)
- #define RGB_PALEGRAY MAKERGB(204, 204, 204)
-
-
- /***************************************************************************
- * Function Prototypes. *
- ***************************************************************************/
-
- extern "C" int _CRT_init (void);
- extern "C" void __ctordtorInit (void);
- ULONG _System _DLL_InitTerm (HMODULE, ULONG);
-
- PAPPINFO GuiAppInfo (void);
- void GuiInitApp (PSZ, PSZ);
- void GuiExitApp (SHORT);
- void GuiSetHlpFile (PSZ, HMODULE);
- void GuiSetMsgFile (PSZ);
- void GuiSaveCmdLine (int, char *[]);
- SHORT GuiCmdLineCnt (void);
- String GuiCmdLineArg (SHORT);
- BOOL GuiForever (void);
- void GuiDoNothing (void);
-
- PMESSAGE GuiNullMsg (void);
- void GuiSetMsg (PMESSAGE, LONG, ULONG);
- String GuiLoadMsg (PMESSAGE);
- SHORT GuiShowMsg (PWINDOW, PMESSAGE, String, String);
- SHORT GuiInvokeMsg (PWINDOW, PMESSAGE);
-
- void GuiShowHelp (SHORT);
- void GuiShowHelpContents (void);
- void GuiShowHelpIndex (void);
- void GuiShowHelpForHelp (void);
-
- LONG GuiRunProgram (String, String, LONG);
- LONG GuiWaitProgram (LONG, SHORT);
-
- LONG GuiRandom (LONG, LONG);
- void GuiSeed (LONG);
-
- BOOL GuiError (LONG, LONG, PSZ);
- void GuiDebug (char *, ...);
- void GuiDebugMsg (char *, ULONG, MPARAM, MPARAM);
-
- void GuiInitWindows (PAPPINFO);
- PWINDOW GuiDesktopWindow (void);
- PWINDOW GuiObjectWindow (void);
- PWINDOW GuiNullWindow (void);
- BOOL _System GuiMsgFilter (HAB, PQMSG, USHORT);
- void GuiFillBackground (HWND, HPS);
- LONG GuiGetPresRGB (HWND, ULONG, ULONG, LONG);
- void GuiGetClientRect (PWINDOW, PLONG, PLONG, PLONG, PLONG);
- void GuiSetMousePtr (HWND, HPOINTER);
- void GuiSetCapture (PWINDOW);
- SHORT GuiInvokeWindow (PWINDOW, PWINDOW);
- BOOL GuiLoadWindow (PWINDOW, PWINDOW);
- BOOL GuiLoadWindow2 (PWINDOW);
- BOOL GuiUnloadWindow (PWINDOW);
- SHORT GuiProcessWindow (PWINDOW);
- void GuiDismissWindow (PWINDOW, SHORT);
- void GuiActivateWindow (PWINDOW);
- void GuiGiveFocusWindow (PWINDOW);
- void GuiMaximizeWindow (PWINDOW);
- void GuiMinimizeWindow (PWINDOW);
- void GuiRestoreWindow (PWINDOW);
- void GuiGetWindow (PWINDOW, HWND);
- void GuiSetWindow (PWINDOW, LONG, PSZ, PFNWP, HMODULE);
- void GuiSetControl (PWINDOW, PWINDOW, LONG, PSZ);
-
- void GuiSetColor (PWINDOW, LONG, LONG);
- LONG GuiGetColor (PWINDOW, LONG);
- void GuiSetFont (PWINDOW, String);
- String GuiGetFont (PWINDOW);
- BOOL GuiFontAttrs (PSZ, PFATTRS);
- LONG GuiFontCount (void);
- String GuiEnumFonts (LONG);
-
- SHORT GuiGetShort (PWINDOW, LONG);
- void GuiSetShort (PWINDOW, LONG, SHORT);
- LONG GuiGetLong (PWINDOW, LONG);
- void GuiSetLong (PWINDOW, LONG, LONG);
- double GuiGetReal (PWINDOW, LONG);
- void GuiSetReal (PWINDOW, LONG, REAL);
- String GuiGetString (PWINDOW, LONG);
- void GuiSetString (PWINDOW, LONG, String);
- Image GuiGetImage (PWINDOW, LONG);
- void GuiSetImage (PWINDOW, LONG, Image);
- PVOID GuiGetPtr (PWINDOW, LONG);
- void GuiSetPtr (PWINDOW, LONG, PVOID);
- LONG GuiDataIndex (HWND);
- MRESULT GuiSendMsg (HWND, ULONG, MPARAM, MPARAM);
- BOOL GuiEventLoop (MPARAM);
- BOOL GuiTabbing (HWND, ULONG, MPARAM, MPARAM);
- MRESULT GuiDefFrameProc (PFNWP, HWND, ULONG, MPARAM, MPARAM);
- MRESULT GuiDefWinProc (PFNWP, HWND, ULONG, MPARAM, MPARAM);
-
- PMENTRY GuiFrameCtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiMenuCtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiButtonCtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiComboboxCtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiEntryCtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiListboxCtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiMLECtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiScrollbarCtlProc (HWND, ULONG, MPARAM, MPARAM);
- PMENTRY GuiStaticCtlProc (HWND, ULONG, MPARAM, MPARAM);
-
- SHORT GuiInsertItem (PWINDOW, SHORT, String);
- void GuiDeleteItem (PWINDOW, SHORT);
- void GuiClearItems (PWINDOW);
- String GuiGetItemText (PWINDOW, SHORT);
- void GuiSetItemText (PWINDOW, SHORT, String);
- LONG GuiGetItemHandle (PWINDOW, SHORT);
- void GuiSetItemHandle (PWINDOW, SHORT, LONG);
- void GuiSelectItem (PWINDOW, SHORT, BOOL);
- SHORT GuiNextSelection (PWINDOW, SHORT);
-
- int GuiAbs (int);
- SHORT GuiAbs (SHORT);
- LONG GuiAbs (LONG);
- SREAL GuiAbs (SREAL);
- REAL GuiAbs (REAL);
- LREAL GuiAbs (LREAL);
-
- int GuiMod (int, int);
- SHORT GuiMod (SHORT, SHORT);
- LONG GuiMod (LONG, LONG);
- SREAL GuiMod (SREAL, SREAL);
- REAL GuiMod (REAL, REAL);
- LREAL GuiMod (LREAL, LREAL);
-
- REAL GuiInt (REAL);
- REAL GuiFrac (REAL);
- REAL GuiExp (REAL);
- REAL GuiLog (REAL);
- REAL GuiSqr (REAL);
- REAL GuiPow (REAL, REAL);
- REAL GuiFloor (REAL);
- REAL GuiCeil (REAL);
- REAL GuiSin (REAL);
- REAL GuiCos (REAL);
- REAL GuiTan (REAL);
- REAL GuiASin (REAL);
- REAL GuiACos (REAL);
- REAL GuiATan (REAL);
- REAL GuiPI (void);
- REAL GuiDeg (REAL);
- REAL GuiRad (REAL);
-
- LONG GuiGetPS (PWINDOW);
- void GuiReleasePS (LONG);
- void GuiClearPS (LONG);
- void GuiMoveTo (LONG, LONG, LONG);
- void GuiLineTo (LONG, LONG, LONG);
- void GuiDrawLine (LONG, LONG, LONG, LONG, LONG);
- void GuiDrawBox (LONG, LONG, LONG, LONG, LONG);
- void GuiDrawCircle (LONG, LONG, LONG);
- void GuiDrawEllipse (LONG, LONG, LONG, LONG);
- void GuiDrawText (LONG, String);
- void GuiDrawImage (LONG, Image, LONG);
- void GuiSetDrawColor (LONG, LONG);
- LONG GuiGetDrawColor (LONG);
- void GuiSetBackColor (LONG, LONG);
- LONG GuiGetBackColor (LONG);
- void GuiSetSysColor (LONG, LONG);
- LONG GuiGetSysColor (LONG);
- void GuiSetLineType (LONG, LONG);
- LONG GuiGetLineType (LONG);
- void GuiSetFillPattern (LONG, LONG);
- LONG GuiGetFillPattern (LONG);
-
- /* DLL support */
- BOOL GuiRecordDLL (PFN);
- void GuiSetupDlls (void);
-
- /* DDE support */
- #ifdef INCL_PM
- SHORT GuiDdeAcknowledge (WINDOW *pWin, HWND hwndOther, PSZ pszItem, SHORT sStatus);
- SHORT GuiDdeAdvise (WINDOW *pWin, HWND hwndOther, PSZ pszItem, USHORT usFormat, BOOL bFlow, BOOL bData);
- SHORT GuiDdeSendText (WINDOW *pWin, HWND hwndOther, PSZ pszItem, PSZ pszText, SHORT Response, SHORT AckReq);
- SHORT GuiDdeExecute (WINDOW *pWin, HWND hwndOther, PSZ pszCommand);
- SHORT GuiDdeInitiate (WINDOW *pWin, PSZ pszAppName, PSZ pszTopicName, ULONG ulTimeOut);
- SHORT GuiDdeRespond (WINDOW *pWin, HWND hwndOther, PSZ pszAppName, PSZ pszTopicName);
- SHORT GuiDdeRequest (WINDOW *pWin, HWND hwndOther, PSZ pszItem, USHORT usFormat);
- SHORT GuiDdeTerminate (WINDOW *pWin, HWND hwndOther);
- SHORT GuiDdeUnadvise (WINDOW *pWin, HWND hwndOther, PSZ pszItem, USHORT usFormat);
- PSZ GuiDdeFetchTextItem (WINDOW *pWin, PDDESTRUCT pDdeStruct);
- SHORT GuiDdeError (PDDESTRUCT pDdeStruct);
- #endif /* INCL_PM */
-
-
- #endif /* H_GUIRUN */
-
-
-
-